package com.sphd.emanu.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.emanu.R;
import com.sphd.emanu.config.Constant;
import com.sphd.emanu.pojo.vip.MemDeposit;
import com.wzutils.BigDisMailUtils;
import com.wzutils.TimeUtils;

import java.util.List;

/**
 * @Author Hu
 * @Time 2017/6/28 --17:01.
 * @Email 87683202@qq.com
 */
public class TopupcenterAdapter extends BaseQuickAdapter<MemDeposit,BaseViewHolder> {
    public TopupcenterAdapter(@LayoutRes int layoutResId, @Nullable List<MemDeposit> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MemDeposit item) {

        helper
                .setText(R.id.item_topup_money,"充值金额"+ BigDisMailUtils.turnTrim(item.getCreditFact(), Constant.POINT)+"元")
                .setText(R.id.item_topup_time, TimeUtils.dateToString(item.getCreateDate(),TimeUtils.YEAR_MONTH_DAY_HOUR_MIN_SS));
    }
}
